package com.isi.mtl.lf.jag.parameters;

import java.util.HashMap;

import com.isi.mtl.lf.jag.constantes.Languages;

public class AutoCompleteParameter {
	
	/***
	 *
	 *@author Loïc FALKLAND
	 *@version 1.0
	 * 
	 * 
	 */
	
	private String input;
	private String API_Key;
	private Integer language = Languages.ENGLISH;
	private Boolean sensor = false;
	private Boolean secure_transaction = true;
	private HashMap<Integer, String> languageMapping;
	

	public AutoCompleteParameter(String input, String API_Key) {
		this.input = input;
		this.API_Key = API_Key;
	}
	
	public AutoCompleteParameter(String input, String API_Key,
			Integer language) {
		this.input = input;
		this.API_Key = API_Key;
		this.language = language;
	}
	
	
	public AutoCompleteParameter(String input, String API_Key, Boolean sensor,
			Boolean secure_transaction) {
		this.input = input;
		this.API_Key = API_Key;
		this.sensor = sensor;
		this.secure_transaction = secure_transaction;
	}

	public AutoCompleteParameter(String input, String API_Key,
			Integer language, Boolean sensor, Boolean secure_transaction) {
		this.input = input;
		this.API_Key = API_Key;
		this.language = language;
		this.sensor = sensor;
		this.secure_transaction = secure_transaction;
	}

	{
		//Setting mapping de la langue
		languageMapping = new HashMap<Integer, String>();
		languageMapping.put(Languages.ARABIC, "ar");
		languageMapping.put(Languages.BASQUE, "eu");
		languageMapping.put(Languages.BULGARIAN, "bg");
		languageMapping.put(Languages.BENGALI, "bn");
		languageMapping.put(Languages.CATALAN, "ca");
		languageMapping.put(Languages.CZECH, "cs");
		languageMapping.put(Languages.DANISH, "da");
		languageMapping.put(Languages.GERMAN, "de");
		languageMapping.put(Languages.GREEK, "el");
		languageMapping.put(Languages.ENGLISH, "en");
		languageMapping.put(Languages.ENGLISH_AUSTRALIAN, "en-AU");
		languageMapping.put(Languages.ENGLISH_GB, "en-GB");
		languageMapping.put(Languages.SPANISH, "es");
		languageMapping.put(Languages.FARSI, "fa");
		languageMapping.put(Languages.FINNISH, "fi");
		languageMapping.put(Languages.FILIPINO, "fil");
		languageMapping.put(Languages.FRENCH, "fr");
		languageMapping.put(Languages.GALICIAN, "gl");
		languageMapping.put(Languages.GUJARATI, "gu");
		languageMapping.put(Languages.HINDI, "hi");
		languageMapping.put(Languages.CROATIAN, "hr");
		languageMapping.put(Languages.HUNGARIAN, "hu");
		languageMapping.put(Languages.INDONESIAN, "id");
		languageMapping.put(Languages.ITALIAN, "it");
		languageMapping.put(Languages.HEBREW, "iw");
		languageMapping.put(Languages.JAPANESE, "ja");
		languageMapping.put(Languages.KANNADA, "kn");
		languageMapping.put(Languages.KOREAN, "ko");
		languageMapping.put(Languages.LITHUANIAN, "lt");
		languageMapping.put(Languages.LATVIAN, "lv");
		languageMapping.put(Languages.MALAYALAM, "ml");
		languageMapping.put(Languages.MARATHI, "mr");
		languageMapping.put(Languages.DUTCH, "nl");
		languageMapping.put(Languages.NORWEGIAN, "no");
		languageMapping.put(Languages.POLISH, "pl");
		languageMapping.put(Languages.PORTUGUESE, "pt");
		languageMapping.put(Languages.PORTUGUESE_BR, "pt-BR");
		languageMapping.put(Languages.PORTUGUESE_PT, "pt-PT");
		languageMapping.put(Languages.ROMANIAN, "ro");
		languageMapping.put(Languages.RUSSIAN, "ru");
		languageMapping.put(Languages.SLOVAK, "sk");
		languageMapping.put(Languages.SLOVENIAN, "sl");
		languageMapping.put(Languages.SERBIAN, "sr");
		languageMapping.put(Languages.SWEDISH, "sv");
		languageMapping.put(Languages.TAGALOG, "tl");
		languageMapping.put(Languages.TAMIL, "ta");
		languageMapping.put(Languages.TELUGU, "te");
		languageMapping.put(Languages.THAI, "th");
		languageMapping.put(Languages.TURKISH, "tr");
		languageMapping.put(Languages.UKRAINIAN, "uk");
		languageMapping.put(Languages.VIETNAMESE, "vi");
		languageMapping.put(Languages.CHINESE_SIMPLIFIED, "zh-CN");
		languageMapping.put(Languages.CHINESE_TRADITIONAL, "zh-TW");
	}


	//Getters / Setters
	public String getInput() {
		return input;
	}

	public void setInput(String input) {
		this.input = input;
	}

	public String getAPI_Key() {
		return API_Key;
	}

	public void setAPI_Key(String aPI_Key) {
		API_Key = aPI_Key;
	}

	public Boolean getSensor() {
		return sensor;
	}

	public void setSensor(Boolean sensor) {
		this.sensor = sensor;
	}

	public Boolean getSecure_transaction() {
		return secure_transaction;
	}

	public void setSecure_transaction(Boolean secure_transaction) {
		this.secure_transaction = secure_transaction;
	}

	public HashMap<Integer, String> getLanguageMapping() {
		return languageMapping;
	}

	public void setLanguageMapping(HashMap<Integer, String> languageMapping) {
		this.languageMapping = languageMapping;
	}

	public Integer getLanguage() {
		return language;
	}

	public void setLanguage(Integer language) {
		this.language = language;
	}
	

	
}
